<template>
	<rh-wx class="hd-pay-code-container">
    <view class="code-content flex-column">
      <view class="code-txt">
        请输入尾号为{{showTel}}的手机验证码
      </view>
      <rh-code v-model="code" :phonenumber="phonenumber"></rh-code>
    </view>
		<rh-submit-btn text="完成注册并支付" class-name="special" color="#23994f" :submit-action="submit"></rh-submit-btn>
	</rh-wx>
</template>

<script>
	export default {
		data() {
			return {
				phonenumber: '',
				code: '',
			}
		},
		computed: {
			showTel(){
				let tel = this.phonenumber || ''
				
				return `****${tel.substring(7)}`
			},
		},
		onLoad() {
			this.phonenumber = uni.getStorageSync('icar-wxtel')
			let _self = this
		},
		methods: {
			submit(val){
				let _self = this
				return new Promise((resolve, reject) => {
					// resolve({name: this.name})
					// console.log(_self.phonenumber, _self.code)
					let params = {
						
					}
					reject(false)
				})
			},
		}

	}
</script>
<style lang="scss" scoped>
  // @include fontStyle(#666, 24rpx);
	@mixin fontStyle($color, $size, $weight: 500) {
		color: $color;
		font-size: $size;
		font-weight: $weight;
	}
	.hd-pay-code-container{
		background-color: #fff;
		height: 100vh;
    padding: 80rpx 30rpx 0;
    .code-content{
      .code-txt{
        @include fontStyle(#3D3D3D, 32rpx);
        margin-bottom: 100rpx;
      }
    }
	}

</style>




